/* Modern AI Interview Platform Styles */
@import url("https://fonts.googleapis.com/css2?family=Ibarra+Real+Nova:ital,wght@0,400..700;1,400..700&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Caveat:wght@400..700&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Caveat:wght@400..700&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');


* {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    padding: 0;
    box-sizing: border-box;
}


:root {
    --B1: #77a9f0;
    --B2: #3e52d5;
    --lightBG: #f4f7ff;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    color: #333333;
    overflow-x: hidden;
    min-height: 100vh;
    font-weight: 400;
    line-height: 1.6;
}

.app-container {
    position: relative;
    min-height: 100vh;
    padding: 2rem;
    z-index: 1;
}

/* Loading State */
.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.loading-content {
    text-align: center;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    color: #333333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    padding: 3rem;
    max-width: 500px;
    width: 100%;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #4facfe;
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    border-top-color: #00f2fe;
    animation-delay: 0.3s;
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
}

.spinner-ring:nth-child(3) {
    border-top-color: #667eea;
    animation-delay: 0.6s;
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Invalid State */
.invalid-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.invalid-content {
    text-align: center;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    color: #333333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
}

.invalid-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.invalid-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--error-color);
}

.invalid-content>p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.invalid-suggestions {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.invalid-suggestions h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.invalid-suggestions ul {
    list-style: none;
    padding: 0;
}

.invalid-suggestions li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.invalid-suggestions li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-gradient);
    font-weight: bold;
}

.retry-button {
    background: var(--secondary-gradient);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.retry-button:active {
    transform: translateY(0);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: calc(100vh - 4rem);
    /* Account for padding */
}

/* Interview Section - Fixed Height */
.interview-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    /* box-shadow: var(--shadow-xl); */
    height: 450px;
    /* Fixed height */
    display: flex;
    align-items: center;
}

.video-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    height: 100%;
}

.video-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    /* border: 2px solid var(--glass-border); */
    height: 100%;
    /* Take full height of container */
}

.candidate-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.ai-video {
    background: var(--dark-gradient);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-video-content {
    height: 446px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ai-interviewer-img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.video-overlay {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    /* 75 is ~46% opacity in hex */
    padding: 0.5rem 1rem;
    border-radius: 50px;

    /* border: 1px solid rgba(255, 255, 255, 0.1); */
}

.video-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
}

span.ailabel {
    background: rgba(61, 61, 61, 0.4);
    color: #fff;
    padding: 0.3em 1em;
    border-radius: 2em;
    font-size: 19.85px;
    /* adjust as needed */
    font-weight: 600;
}

/* Control Section - Equal Space */
.control-section {
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    /* gap: 2rem; */
    /* flex: 1; */
    /* Take remaining space */
    justify-content: center;
}

.start-button {
    position: relative;
    background: linear-gradient(to bottom right, var(--B1), var(--B2));
    border: none;
    color: white;
    padding: 14px 83px;
    font-size: 20px;
    font-weight: 400;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
    justify-content: center;
}

.start-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.start-button:active:not(:disabled) {
    transform: translateY(0);
}

.start-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

.button-icon {
    font-size: 1.2rem;
}

/* Bottom Strip */
.bottom-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* background: rgba(0, 0, 0, 0.9); */
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 4rem;
    z-index: 100;
}

.bottom-strip-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.interview-time-text {
    font-size: 24px;

    color: #666476;
    font-weight: 600;
}


.time-left-text {
    font-size: 24px;
    color: #666476;
    font-weight: 600;
    background: #EBE7FF;
    padding: 10px 24px;
    border-radius: 50px;
}

.interview-time-text strong,
.time-left-text strong {
    color: #666476;
    font-size: 24px;
    font-weight: 600;
}

strong#time-left-display {
    background: linear-gradient(90deg, #77A9F0, #3E52D5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.end-interview-btn {
    background: var(--error-color);
    border: none;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.end-interview-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(to bottom right, var(--B1), var(--B2));
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.completion-icon {
    font-size: 3rem;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.modal-body {
    margin-bottom: 2rem;
}

.conclusion-message {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
    color: white;
    padding: 1rem;
}

.secondary-button {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.secondary-button:hover {
    background: var(--glass-bg);
    border-color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        padding: 1rem;
    }

    .main-content {
        gap: 1.5rem;
        min-height: calc(100vh - 2rem);
    }

    .interview-section {
        height: 400px;
        padding: 1.5rem;
    }

    .video-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ai-interviewer-img {
        max-width: 120px;
        max-height: 120px;
    }

    .bottom-strip {
        padding: 0.75rem 1rem;
    }

    .bottom-strip-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .loading-content,
    .invalid-content {
        padding: 2rem;
    }

    .loading-content h2,
    .invalid-content h2 {
        font-size: 1.3rem;
    }

    .invalid-suggestions {
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.img {
    width: 224px;
    height: 55.22px;
    overflow: hidden;
}

.img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* or 'cover' if you want it to fill the box */
    display: block;
}

.class-text p {
    color: #666476;
    font-size: 26.94px;
    font-weight: 600;
    /* semi-bold */
}

.headerComponent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* vertically align logo and text */
    padding: 10px 20px;
    /* optional spacing */
}

.img {
    width: 224px;
    height: 55.22px;
    overflow: hidden;
}

.img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.class-text p {
    color: #666476;
    font-size: 26.94px;
    font-weight: 600;
    margin: 0;
    /* removes default spacing */
}

.headerComponent {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.G-blue-bg {
    background: linear-gradient(to bottom right, var(--B1), var(--B2));
}