/* Modern Premium CSS for CSVET Portal */

:root {
    --bg-dark: #07090e;
    --bg-card: rgba(13, 19, 33, 0.75);
    --bg-card-hover: rgba(18, 26, 46, 0.85);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Decorative Blobs */
.bg-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    mix-blend-mode: screen;
    animation: floatBlob 25s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: 10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #10b981 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: 5%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    animation-delay: -5s;
    animation-duration: 30s;
}

.blob-3 {
    top: 30%;
    right: 25%;
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    animation-delay: -10s;
    animation-duration: 22s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(5%, 8%) scale(1.1);
    }
    100% {
        transform: translate(-3%, -5%) scale(0.95);
    }
}

/* Base Layout Container */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    z-index: 10;
    position: relative;
}

/* Header */
.main-header {
    text-align: center;
    padding: 5rem 0 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    position: relative;
}

.logo-icon {
    width: 48px;
    height: 48px;
    color: #10b981;
    filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.4));
    animation: logoPulse 4s infinite ease-in-out;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 22px rgba(16, 185, 129, 0.6));
    }
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 30%, #a7f3d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    color: #10b981;
    -webkit-text-fill-color: initial;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    max-width: 800px;
}

.main-title span {
    background: linear-gradient(90deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.6;
}

/* Grid Layout */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    padding-bottom: 5rem;
}

/* Glassmorphic Cards */
.portal-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--theme-color);
    opacity: 0.8;
    transition: var(--transition-smooth);
}

.portal-card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    border-color: var(--theme-color-op20);
    box-shadow: 0 12px 40px -10px var(--theme-color-op20), var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.75rem;
}

.card-icon-container {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    color: var(--theme-color);
}

.portal-card:hover .card-icon-container {
    background: var(--theme-color-op10);
    border-color: var(--theme-color-op40);
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 0 15px var(--theme-color-op20);
}

.card-icon-container svg {
    width: 28px;
    height: 28px;
    transition: var(--transition-smooth);
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 30px;
    letter-spacing: 0.02em;
    background: var(--theme-color-op10);
    border: 1px solid var(--theme-color-op30);
    color: var(--theme-color);
    transition: var(--transition-smooth);
}

.portal-card:hover .badge {
    background: var(--theme-color);
    color: #000000;
    font-weight: 700;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-card:hover .card-title {
    color: var(--theme-color);
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-color);
    margin-top: auto;
    transition: var(--transition-smooth);
}

.card-footer svg {
    width: 18px;
    height: 18px;
    transition: var(--transition-smooth);
    transform: translateX(0);
}

.portal-card:hover .card-footer svg {
    transform: translateX(4px);
}

/* Footer Section */
.main-footer {
    margin-top: auto;
    padding: 4rem 0 3rem;
    border-top: 1px solid var(--border-color);
    background: rgba(5, 7, 12, 0.8);
    backdrop-filter: blur(10px);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-text a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-text a:hover {
    color: #10b981;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.social-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
    transform: translateY(-3px);
}

.social-btn svg {
    width: 18px;
    height: 18px;
}

/* REDIRECT PAGE SPECIFIC STYLES */
.redirect-container {
    max-width: 550px;
    margin: 8vh auto;
    padding: 3rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.redirect-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--theme-color);
}

.redirect-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--theme-color-op10);
    border: 1px solid var(--theme-color-op30);
    color: var(--theme-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px var(--theme-color-op10);
}

.redirect-icon-large svg {
    width: 40px;
    height: 40px;
}

.redirect-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.redirect-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.redirect-subtitle strong {
    color: var(--text-primary);
}

/* Countdown loader */
.loader-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 2.5rem;
}

.loader-svg {
    transform: rotate(-90deg);
    width: 100px;
    height: 100px;
}

.loader-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 6;
}

.loader-bar {
    fill: none;
    stroke: var(--theme-color);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    animation: countdown 3s linear forwards;
}

.loader-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

@keyframes countdown {
    from {
        stroke-dashoffset: 283;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.btn-group {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.btn {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--theme-color);
    color: #000000;
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--theme-color-op30);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .main-header {
        padding: 3.5rem 0 2rem;
    }
    
    .logo-text {
        font-size: 2.1rem;
    }
    
    .main-title {
        font-size: 2.2rem;
    }
    
    .main-subtitle {
        font-size: 1rem;
    }
    
    .portal-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-bottom: 3.5rem;
    }

    .container {
        padding: 0 1.25rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
}
