/* Reset a základné štýly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: white;
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: hidden;
}

/* Hlavný kontajner */
.app {
    min-height: 100vh;
    position: relative;
    height: 100vh;
}

/* Header s pozadím */
.header {
    background: url('./src/assets/images/pattern-bg.png') center/cover;
    height: 40vh;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
    margin-bottom: 0;
    animation: fadeInDown 1s ease-out;
}

.header h1 {
    color: white;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 500;
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.1em;
}

.header h1 span {
    display: inline-block;
    animation: letterBounce 0.6s ease-out both;
}

/* Animácia pre každé písmeno s oneskorením */
.header h1 span:nth-child(1) { animation-delay: 0.1s; }
.header h1 span:nth-child(2) { animation-delay: 0.2s; }
.header h1 span:nth-child(3) { animation-delay: 0.3s; }
.header h1 span:nth-child(4) { animation-delay: 0.4s; }
.header h1 span:nth-child(5) { animation-delay: 0.5s; }
.header h1 span:nth-child(6) { animation-delay: 0.6s; }
.header h1 span:nth-child(7) { animation-delay: 0.7s; }
.header h1 span:nth-child(8) { animation-delay: 0.8s; }
.header h1 span:nth-child(9) { animation-delay: 0.9s; }
.header h1 span:nth-child(10) { animation-delay: 1.0s; }
.header h1 span:nth-child(11) { animation-delay: 1.1s; }
.header h1 span:nth-child(12) { animation-delay: 1.2s; }
.header h1 span:nth-child(13) { animation-delay: 1.3s; }
.header h1 span:nth-child(14) { animation-delay: 1.4s; }
.header h1 span:nth-child(15) { animation-delay: 1.5s; }
.header h1 span:nth-child(16) { animation-delay: 1.6s; }
.header h1 span:nth-child(17) { animation-delay: 1.7s; }

/* Otáčanie pre "IP" po dokončení animácie */
.header h1 span:nth-child(1) {
    animation: letterBounce 0.6s ease-out both, ipRotate 1s ease-out forwards;
    animation-delay: 0.1s, 2s; /* Začne sa otáčať 2s po dokončení */
}

.header h1 span:nth-child(2) {
    animation: letterBounce 0.6s ease-out both, ipRotate 1s ease-out forwards;
    animation-delay: 0.2s, 2s; /* Začne sa otáčať 2s po dokončení */
}

/* Search form */
.search-form {
    width: 90%;
    max-width: 500px;
    position: relative;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Tlačidlo Podporte nás */
.support-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInRight 1s ease-out 0.6s both;
    animation-fill-mode: both;
}

.support-button:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
    animation: none;
    transform: none;
}

/* Zabránenie ovplyvnenia layoutu pri hover */
.support-button {
    will-change: transform;
    transform-style: preserve-3d;
    transform: translateY(0px);
}

.support-button svg {
    width: 16px;
    height: 16px;
}

/* Bočné menu pre podporu */
.support-menu {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    animation: slideInRight 0.3s ease-out;
}

.support-menu.active {
    right: 0;
}

.support-menu-content {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.support-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.support-menu-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c2c2c;
}

.close-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    color: #6c757d;
}

.close-menu:hover {
    background: #f8f9fa;
    color: #495057;
}

.support-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.support-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    background: white;
    min-height: 80px;
    height: 80px;
    box-sizing: border-box;
}

.support-option:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
    animation: float 0.6s ease-in-out;
}

.support-option.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.support-option.coming-soon:hover {
    transform: none;
    border-color: #e9ecef;
    box-shadow: none;
}

.support-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.support-option.coming-soon .support-icon {
    background: #6c757d;
}

.support-option.coming-soon .bitcoin-icon {
    background: linear-gradient(135deg, #f7931a 0%, #ff6b35 100%);
}

/* Bank option */
.bank-option {
    cursor: pointer;
}

/* Animácie pre notifikácie */
@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 30px));
    }
}

/* Špecifické farby pre ikony */
.revolut-icon {
    background: linear-gradient(135deg, #0075eb 0%, #00d4aa 100%) !important;
}

.bank-icon {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
}


.support-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c2c2c;
}

.support-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Overlay pre zatvorenie menu */
.support-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: -100vw;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.support-menu.active::before {
    opacity: 1;
    pointer-events: auto;
}

/* Spodná sekcia s kontaktom a autorskými právami */
.support-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.footer-section {
    margin-bottom: 1.5rem;
}

.footer-section:last-child {
    margin-bottom: 0;
}

.footer-section h5 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2c2c2c;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #5a6fd8;
    text-decoration: none;
}

.contact-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.copyright {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    outline: none;
    background: white;
    color: #2c2c2c;
    transition: all 0.3s ease;
}

.search-input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.search-input::placeholder {
    color: #969696;
}

.search-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: #2c2c2c;
    border: none;
    border-radius: 0 15px 15px 0;
    padding: 0 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: #000;
    transform: scale(1.05);
    animation: glow 1s ease-in-out;
}

.search-button:disabled {
    background: #969696;
    cursor: not-allowed;
}

/* Kontajner pre informácie */
.info-container {
    position: relative;
    z-index: 20;
    width: 100%;
    margin-top: -5rem;
    padding: 0 5%;
    pointer-events: none;
}

/* Tabuľka s informáciami */
.info-table {
    position: relative;
    z-index: 20;
    width: 90%;
    max-width: 80rem;
    margin: 0 auto;
    background: white;
    border-radius: 14px;
    padding: 2rem;
    text-align: left;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    list-style: none;
    min-height: 9rem;
    color: #2c2c2c;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    animation: slideInUp 0.8s ease-out;
    transform: translateY(0);
    opacity: 1;
    border: 2px dashed #667eea;
    background-image: 
        radial-gradient(circle at 0 0, transparent 0, transparent 2px, #667eea 2px, #667eea 4px, transparent 4px),
        radial-gradient(circle at 100% 0, transparent 0, transparent 2px, #667eea 2px, #667eea 4px, transparent 4px),
        radial-gradient(circle at 0 100%, transparent 0, transparent 2px, #667eea 2px, #667eea 4px, transparent 4px),
        radial-gradient(circle at 100% 100%, transparent 0, transparent 2px, #667eea 2px, #667eea 4px, transparent 4px);
    background-size: 20px 20px;
    background-position: 0 0, 100% 0, 0 100%, 100% 100%;
    background-repeat: no-repeat;
}

.info-table li {
    padding-right: 1rem;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.info-table li:nth-child(1) { animation-delay: 0.1s; }
.info-table li:nth-child(2) { animation-delay: 0.2s; }
.info-table li:nth-child(3) { animation-delay: 0.3s; }
.info-table li:nth-child(4) { animation-delay: 0.4s; }
.info-table li:nth-child(5) { animation-delay: 0.5s; }
.info-table li:nth-child(6) { animation-delay: 0.6s; }
.info-table li:nth-child(7) { animation-delay: 0.7s; }

.info-table span {
    display: block;
    font-weight: 500;
}

.info-table span:first-of-type {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 13px;
    opacity: 0.8;
    color: #969696;
}

.info-table span:last-of-type {
    padding-top: 18px;
    font-size: 20px;
    font-size: clamp(15px, 2vw, 20px);
    font-weight: bold;
    line-height: 1.3;
    color: #2c2c2c;
}


/* Loading spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 2.5rem;
    gap: 0.5rem;
}

.loading img {
    height: 2.5rem;
    animation: spin 1s linear infinite;
}

.loading span {
    color: #2b2b2b;
    font-weight: 500;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error message */
.error-message {
    margin: auto;
    font-size: 20px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #ff4848;
}

.error-message svg {
    transform: scale(1.4);
}

/* Mapa */
.map-container {
    height: 60vh;
    width: 100%;
    position: absolute;
    z-index: 1;
    top: 40vh;
    left: 0;
    background: transparent;
    animation: fadeInUp 1s ease-out 0.8s both;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    pointer-events: auto;
}

/* Zakázanie pravého kliku na všetkých elementoch mapy - okrem info tabuľky */
.map-container *:not(.info-table):not(.info-table *):not(.info-table li):not(.info-table span) {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    pointer-events: auto;
}

/* Povolenie označovania textu v info tabuľke - najvyššia priorita */
.info-table {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
    pointer-events: auto !important;
    cursor: text !important;
}

.info-table li {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
    pointer-events: auto !important;
    cursor: text !important;
}

.info-table span {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
    pointer-events: auto !important;
    cursor: text !important;
}

/* Špecifické pravidlá pre text v tabuľke */
.info-table span:last-of-type {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    cursor: text !important;
}

/* Skryj Leaflet attribution panel */
.leaflet-control-attribution {
    display: none !important;
}

/* Vylepšenie popup okna */
.leaflet-popup-content-wrapper {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    border: 1px solid #e5e5e7 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    line-height: 1.4 !important;
}

.leaflet-popup-tip {
    background: white !important;
    border: 1px solid #e5e5e7 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Responsive design */
@media screen and (max-width: 770px) {
    .support-button {
        position: absolute;
        top: 1rem;
        right: 1rem;
        margin: 0;
        display: flex;
        justify-content: center;
        width: auto;
        min-width: 120px;
        font-size: 13px;
        padding: 0.6rem 1rem;
    }
    
    .support-menu {
        width: 100%;
        right: -100%;
    }
    
    .info-container {
        padding: 0 2%;
    }
    
    .info-table {
        grid-template-columns: 1fr;
        text-align: center;
        align-items: center;
        max-width: 30rem;
        gap: 20px;
        width: 100%;
    }
    
    .info-table li {
        width: auto;
        padding-right: 0;
    }
    
    .info-table span:last-of-type {
        padding-top: 6px;
    }
}

/* Extra malé obrazovky */
@media screen and (max-width: 480px) {
    .support-button {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        min-width: 100px;
        font-size: 12px;
        padding: 0.5rem 0.8rem;
    }
    
    .support-button svg {
        width: 14px;
        height: 14px;
    }
    
    .map-container {
        margin-top: -3rem;
    }
}

@media screen and (max-width: 1300px) {
    .info-table li {
        padding-right: 0;
    }
}


/* Animácie */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8), 0 0 30px rgba(102, 126, 234, 0.6);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes letterBounce {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translateY(-15px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ipRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loading animácia */
.loading-message {
    animation: pulse 2s infinite;
}

/* Support button positioning */
.support-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInRight 1s ease-out 0.6s both;
    will-change: transform;
    transform-style: preserve-3d;
    transform: translateY(0px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.support-button:hover {
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
    animation: none;
    transform: translateY(-1px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.support-button svg {
    width: 16px;
    height: 16px;
}

/* Responsive design for support button */
@media screen and (max-width: 768px) {
    .support-button {
        position: absolute;
        top: 1rem;
        right: 1rem;
        margin: 0;
        min-width: auto;
        font-size: 13px;
        padding: 0.5rem 0.8rem;
        border-radius: 5px;
    }
    
    .support-button svg {
        width: 14px;
        height: 14px;
    }
}

@media screen and (max-width: 480px) {
    .support-button {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        min-width: auto;
        font-size: 12px;
        padding: 0.4rem 0.6rem;
        border-radius: 4px;
    }
    
    .support-button svg {
        width: 12px;
        height: 12px;
    }
}


/* Fonty */
@font-face {
    font-family: 'Rubik';
    src: url('./src/assets/fonts/Rubik-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Rubik';
    src: url('./src/assets/fonts/Rubik-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Rubik';
    src: url('./src/assets/fonts/Rubik-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
