/* ================================================
   USER PAGE STYLES - LOGIN/REGISTRATION & TUTORIAL
   ================================================ */

/* =====================================
   1. RESET & BASE STYLES
   ===================================== */

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* =====================================
   2. MAIN LAYOUT SYSTEM
   ===================================== */

.main-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 50px 100px; /* Full screen margins for wide screens */
}

.main-content .row {
    width: 100%;
    margin: 0;
    height: 100%;
}

/* Column alignment */
.col-md-6, .col-md-4 {
    display: flex;
    align-items: stretch;
}

/* Equal height for all main elements */
#registrationForm,
#loginForm,
.tutorial-column-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
}

/* Containers full height usage */
#registrationForm .card.widget-content,
#loginForm .card.widget-content,
.tutorial-column-wrapper .simple-tutorial-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 200px); /* Account for margins */
    height: 100%;
}

/* =====================================
   3. TAB NAVIGATION SYSTEM
   ===================================== */

.tab-navigation {
    display: flex;
    width: 90%;
    margin: 0 auto 20px auto;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

.tab-item {
    flex: 1;
    padding: 16px 24px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 4px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
}

.tab-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.tab-item span {
    color: #495057;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

/* Tab States */
.tab-active {
    background: linear-gradient(135deg, #3C096C 0%, #240046 100%);
    border-bottom: 4px solid #FFD700;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(60, 9, 108, 0.3);
    position: relative;
}

.tab-active::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.tab-active span {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    font-weight: 700;
}

.tab-clickable {
    cursor: pointer;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 4px solid #dee2e6;
}

.tab-clickable:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-bottom: 4px solid #6c757d;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.tab-clickable:hover::before {
    left: 100%;
}

.tab-clickable:hover span {
    color: #212529;
    transform: scale(1.02);
}

.tab-clickable:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-clickable:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(60, 9, 108, 0.3);
}

/* Tab separators */
.tab-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.2), transparent);
    z-index: 1;
}

.tab-active::after {
    display: none;
}

/* Tab icon support */
.tab-item .tab-icon {
    margin-right: 8px;
    font-size: 0.9em;
}

/* =====================================
   4. TUTORIAL COMPONENTS
   ===================================== */

.simple-tutorial-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tutorial-column-wrapper {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tutorial-item {
    background-color: #ffffff;
    transform: scale(0.9) translateY(-36px) translateX(+10px);
    border: 4px solid #3C096C;
    border-radius: 0.6rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-height: calc(100vh - 200px);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    margin: 0;
}

.tutorial-item:not(:last-child) {
    margin-bottom: 20px;
}

/* Tutorial Elements */
.tutorial-title {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding: 0;
    text-transform: none;
    letter-spacing: normal;
    text-align: center;
    order: 1;
}

.tutorial-video {
    margin: 0 0 15px 0;
    order: 2;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.tutorial-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
    margin: 0;
    padding: 0;
    order: 3;
    flex-grow: 1;
}

.tutorial-description p {
    margin: 0 0 10px 0;
}

.tutorial-description p:last-child {
    margin-bottom: 0;
}

/* =====================================
   5. LANGUAGE SELECTOR
   ===================================== */

.language-selector-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.language-selector {
    position: relative;
}

.language-dropdown-toggle {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #3C096C;
    border-radius: 25px;
    color: #3C096C;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.language-dropdown-toggle:hover {
    background: #3C096C;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(60, 9, 108, 0.3);
}

.current-language {
    margin-right: 5px;
}

/* Language Dropdown */
.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    display: none;
}

.language-dropdown.show {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.language-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #495057;
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
}

.language-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.language-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #3C096C;
}

.flag-icon {
    width: 20px;
    height: 15px;
    margin-right: 10px;
    border: 1px solid #dee2e6;
    border-radius: 2px;
}

/* =====================================
   6. PRIVACY POLICY CHECKBOX
   ===================================== */

.privacy-policy-container {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.privacy-policy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-left: 15px;
}

.privacy-policy-checkbox input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #3C096C;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.privacy-policy-checkbox input[type="checkbox"]:checked {
    background: #3C096C;
    border-color: #3C096C;
}

.privacy-policy-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.privacy-policy-checkbox .form-check-label {
    cursor: pointer;
    margin: 0;
    flex: 1;
}

.policy-text {
    display: block;
    font-size: 1rem;
    line-height: 1.4;
    color: #333;
    word-wrap: break-word;
    hyphens: auto;
}

.policy-link {
    color: #3C096C;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.policy-link:hover {
    color: #240046;
    text-decoration: none;
}

/* =====================================
   7. ANIMATIONS
   ===================================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================
   8. RESPONSIVE DESIGN
   ===================================== */

/* Large Desktop (1400px+) */
@media (max-width: 1400px) {
    .main-content {
        padding: 40px 60px;
    }
}

/* Desktop (1200px+) */
@media (max-width: 1200px) {
    .main-content {
        padding: 30px 40px;
    }
}

/* Tablet (991px and down) */
@media (max-width: 991px) {
    .main-content {
        padding: 20px;
        min-height: 100vh;
    }

    .col-md-6, .col-md-4 {
        width: 100%;
        max-width: 100%;
        flex: none;
        margin-bottom: 20px;
    }

    #registrationForm,
    #loginForm,
    .tutorial-column-wrapper {
        width: 100%;
    }

    #registrationForm .card.widget-content,
    #loginForm .card.widget-content,
    .tutorial-column-wrapper .simple-tutorial-container {
        min-height: auto;
    }

    .tutorial-item {
        min-height: auto;
    }
}

/* Mobile Large (768px and down) */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }

    .tutorial-item {
        min-height: auto;
        padding: 15px;
        transform: scale(0.95) translateY(-20px);
    }

    .tutorial-title {
        font-size: 1.1rem;
    }

    .tutorial-description {
        font-size: 0.9rem;
    }

    #registrationForm,
    #loginForm,
    .tutorial-column-wrapper {
        width: 100%;
        margin-bottom: 15px;
    }

    #registrationForm .card.widget-content,
    #loginForm .card.widget-content {
        transform: scale(0.95) translateY(-10px);
        min-height: auto;
    }

    /* Tab Navigation */
    .tab-item {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .tab-navigation {
        width: 95%;
        border-radius: 8px 8px 0 0;
    }

    .tab-item span {
        font-size: 0.85rem;
    }

    /* Language Selector */
    .language-selector-container {
        top: 15px;
        right: 15px;
    }

    .language-dropdown-toggle {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .language-dropdown {
        min-width: 160px;
    }

    /* Privacy Policy */
    .privacy-policy-container {
        padding: 12px;
    }

    .policy-text {
        font-size: 0.9rem;
    }
}

/* Mobile Small (480px and down) */
@media (max-width: 480px) {
    /* Tab Navigation */
    .tab-item {
        padding: 10px 12px;
    }

    .tab-item span {
        font-size: 0.8rem;
    }

    /* Language Selector */
    .language-selector-container {
        top: 10px;
        right: 10px;
    }

    .language-dropdown-toggle {
        padding: 5px 10px;
        font-size: 0.75rem;
        border-radius: 20px;
    }

    /* Privacy Policy */
    .privacy-policy-container {
        padding: 10px;
    }

    .privacy-policy-checkbox {
        gap: 10px;
    }

    .privacy-policy-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-top: 1px;
    }

    .policy-text {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}
