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

.page-logo {
    position: absolute;
    top: 20px;
    height: 140px;
    width: auto;
    z-index: 1000;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.college-logo {
    left: 20px;
    top: 0;
    height: 160px;
}

.club-logo {
    right: 20px;
}

@media (max-width: 768px) {
    .page-logo {
        height: 80px;
        top: 10px;
    }

    .college-logo {
        left: 10px;
    }

    .club-logo {
        right: 10px;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    position: relative;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.home-btn {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.home-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

/* Main Content Styles */
.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-section,
.navigation-section {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
}

.login-form h2,
.welcome-message h2 {
    margin-bottom: 20px;
    color: #4a5568;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

button:hover {
    transform: translateY(-2px);
}

/* Round Buttons */
.round-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.round-btn {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border-radius: 15px;
    transition: all 0.3s;
}

.round1-btn {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.round2-btn {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.round-btn h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.round-btn p {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.round-btn small {
    opacity: 0.8;
    font-size: 0.9rem;
}

.round-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    margin-top: 20px;
}

.team-actions {
    text-align: center;
}

.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.admin-link a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s;
}

.admin-link a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Round 1 Styles */
.batch-prompt {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.prompt-content h2 {
    margin-bottom: 20px;
    color: #4a5568;
}

.prompt-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.proctoring-info {
    background: #fef5e7;
    border: 2px solid #f6ad55;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.proctoring-warning {
    background: #fed7d7;
    border: 2px solid #fc8181;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
    color: #742a2a;
}

#warningCounter {
    margin-top: 10px;
    font-weight: 600;
    color: #d69e2e;
}

.question-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.question-container h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.debug-question {
    border-left: 5px solid #f56565;
}

.debug-description {
    background: #f7fafc;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-style: italic;
    color: #4a5568;
}

.options {
    margin: 15px 0;
}

.options label {
    display: block;
    padding: 10px;
    margin: 5px 0;
    background: #f7fafc;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.options label:hover {
    background: #edf2f7;
}

.options input[type="radio"] {
    margin-right: 10px;
}

.submit-section {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.submit-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
}

/* Round 2 Styles */
.coding-problems {
    margin-bottom: 30px;
}

.problem-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.problem-container h2 {
    color: #2d3748;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.problem-description {
    margin-bottom: 20px;
}

.problem-description h4 {
    color: #4a5568;
    margin: 15px 0 10px 0;
}

.problem-description ul {
    margin-left: 20px;
    color: #4a5568;
}

.problem-description pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 10px 0;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 300px;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.warning-text {
    color: #e53e3e;
    font-weight: 600;
    margin-top: 10px;
}

/* Admin Styles */
.admin-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.dashboard-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.dashboard-controls button {
    width: auto;
    padding: 10px 20px;
}

.refresh-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.export-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.logout-btn {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.results-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.stat-card h3 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-card p {
    color: #4a5568;
    font-weight: 600;
}

.results-table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
}

.view-btn,
.code-btn {
    width: auto;
    padding: 5px 10px;
    margin: 2px;
    font-size: 12px;
}

.view-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.code-btn {
    background: linear-gradient(135deg, #805ad5 0%, #6b46c1 100%);
}

.error-message {
    color: #e53e3e;
    margin-top: 10px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .round-buttons {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2rem;
    }

    .dashboard-controls {
        flex-direction: column;
        align-items: center;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 14px;
    }

    table th,
    table td {
        padding: 8px 4px;
    }
}

/* Animation for proctoring warnings */
@keyframes shake {

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

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

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

.proctoring-warning {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

/*
 Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-content h2 {
    color: #2d3748;
    margin-bottom: 15px;
    text-align: center;
}

.modal-content p {
    color: #4a5568;
    margin-bottom: 20px;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    width: auto;
}

.batch1-btn {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.batch2-btn {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

.modal-btn:hover {
    transform: translateY(-2px);
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

/* Code Editor Styles */
.code-question {
    border-left: 5px solid #4299e1;
}

.code-editor-container {
    margin-top: 20px;
}

.code-editor {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 200px;
    background: #1a202c;
    color: #e2e8f0;
}

.code-editor:focus {
    outline: none;
    border-color: #4299e1;
}

.code-controls {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.run-btn,
.test-btn {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

.run-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.test-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.default-btn {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.code-output {
    background: #1a202c;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #2d3748;
}

.code-output .success {
    color: #48bb78;
    font-weight: 600;
}

.code-output .error {
    color: #f56565;
    font-weight: 600;
}

.code-output .info {
    color: #4299e1;
    font-weight: 600;
}

.code-output pre {
    margin: 5px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Problem Container Enhancements */
.problem-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-left: 5px solid #667eea;
}

.problem-container h2 {
    color: #2d3748;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.problem-description {
    margin-bottom: 20px;
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
}

.problem-description h4 {
    color: #4a5568;
    margin: 15px 0 10px 0;
}

.problem-description ul {
    margin-left: 20px;
    color: #4a5568;
}

.problem-description li {
    margin-bottom: 5px;
}

/* Enhanced Question Container */
.question-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #e2e8f0;
}

.question-container.code-question {
    border-left-color: #4299e1;
}

.question-container h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Responsive Design for Modals */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .code-controls {
        flex-direction: column;
    }

    .run-btn,
    .test-btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Enhanced Error Messages */
.error-message {
    color: #e53e3e;
    margin-top: 10px;
    text-align: center;
    font-weight: 600;
    padding: 10px;
    background: #fed7d7;
    border-radius: 5px;
    border: 1px solid #fc8181;
}

/* Code Syntax Highlighting Simulation */
.code-editor {
    tab-size: 4;
}

/* Print Styles for Code */
@media print {

    .code-editor,
    .code-output {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }

    .modal {
        display: none !important;
    }
}

/* Animation for successful operations */
.success-flash {
    animation: successFlash 0.5s ease-in-out;
}

@keyframes successFlash {
    0% {
        background-color: #c6f6d5;
    }

    100% {
        background-color: transparent;
    }
}

/* Enhanced button states */
.run-btn:disabled,
.test-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.run-btn:disabled:hover,
.test-btn:disabled:hover {
    transform: none;
}

/*
 Competition Completed Section */
.completed-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.completed-message {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 600px;
    border: 3px solid #48bb78;
}

.completed-message h2 {
    color: #22543d;
    margin-bottom: 20px;
    font-size: 2rem;
}

.completed-message p {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.completed-info {
    background: #f0fff4;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #48bb78;
}

.completed-info p {
    margin-bottom: 10px;
    color: #22543d;
}

/* Timer Styles */
.timer-container {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    margin: 10px 0;
    display: inline-block;
}

.timer-container h3 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

#timer {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.3rem;
}

/* Section Headers */
.section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 30px 0 20px 0;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.section-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.easy-section {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.medium-section {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.hard-section {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

/* Problem Container Variations */
.easy-problem {
    border-left-color: #48bb78;
}

.medium-problem {
    border-left-color: #ed8936;
}

.hard-problem {
    border-left-color: #f56565;
}

.easy-problem h3::after {
    content: " 🟢";
}

.medium-problem h3::after {
    content: " 🟡";
}

.hard-problem h3::after {
    content: " 🔴";
}

/* Enhanced Problem Descriptions */
.problem-description {
    margin-bottom: 20px;
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #e2e8f0;
}

.easy-problem .problem-description {
    border-left-color: #48bb78;
    background: #f0fff4;
}

.medium-problem .problem-description {
    border-left-color: #ed8936;
    background: #fffaf0;
}

.hard-problem .problem-description {
    border-left-color: #f56565;
    background: #fff5f5;
}

/* Timer Warning States */
.timer-warning {
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0% {
        background-color: rgba(255, 255, 255, 0.2);
    }

    50% {
        background-color: rgba(255, 0, 0, 0.3);
    }

    100% {
        background-color: rgba(255, 255, 255, 0.2);
    }
}

/* Disabled Button States */
.round-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.round-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Progress Indicators */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    width: 0%;
    transition: width 0.3s ease;
}

/* Submission Status */
.submission-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4299e1;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.submission-status.success {
    background: #48bb78;
}

.submission-status.error {
    background: #f56565;
}

/* Mobile Responsiveness for New Elements */
@media (max-width: 768px) {
    .timer-container {
        width: 100%;
        text-align: center;
        margin: 15px 0;
    }

    .section-header h2 {
        font-size: 1.2rem;
    }

    .completed-message {
        margin: 20px;
        padding: 30px 20px;
    }

    .completed-message h2 {
        font-size: 1.5rem;
    }
}

/* Print Styles for Round 2 */
@media print {

    .timer-container,
    .proctoring-warning,
    .submit-section {
        display: none !important;
    }

    .section-header {
        background: #f0f0f0 !important;
        color: black !important;
    }

    .problem-container {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* Termi
nal-style output formatting */
.terminal-output {
    background: #1e1e1e;
    color: #00ff00;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 13px;
    line-height: 1.4;
    border: 1px solid #333;
    margin: 5px 0;
}

.terminal-output.error-text {
    color: #ff4444;
}

.code-output {
    background: #1e1e1e !important;
    color: #00ff00 !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    padding: 10px !important;
    border-radius: 5px;
    border: 1px solid #333;
}

.code-output .success {
    color: #00ff00;
    font-weight: 600;
}

.code-output .error {
    color: #ff4444;
    font-weight: 600;
}

.code-output .info {
    color: #4299e1;
    font-weight: 600;
}

/* Admin delete button styles */
.btn-delete {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.2s;
    width: auto;
}

.btn-delete:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

.btn-delete:active {
    transform: translateY(0);
}