/* Reset ve Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F8FAFC;
    color: #111827;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container */
#app {
    position: relative;
    min-height: 100vh;
    width: 100%;
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* Splash Screen */
#splash-screen {
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 50%, #60A5FA 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-container {
    text-align: center;
    animation: splashFadeIn 2s ease-out;
}

.logo-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
    background: white;
    border-radius: 30px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoScale 2s ease-out;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
}

.app-title {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    letter-spacing: -1px;
    animation: titleSlide 2s ease-out 0.5s both;
}

.app-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-bottom: 60px;
    animation: subtitleFade 2s ease-out 1s both;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Login Screen */
#login-screen {
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    padding: 24px;
    overflow-y: auto;
}

.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding-top: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 48px;
}

.logo-small {
    width: 80px;
    height: 80px;
    margin: 0 auto 32px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideUp 0.6s ease-out;
}

.logo-small img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    animation: slideUp 0.6s ease-out 0.2s both;
}

.login-header p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    animation: slideUp 0.6s ease-out 0.4s both;
}

.login-form {
    background: white;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out 0.6s both;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .material-icons {
    position: absolute;
    left: 16px;
    color: #6B7280;
    font-size: 20px;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 52px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    background: #F9FAFB;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #3B82F6;
    border-width: 2px;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-wrapper input::placeholder {
    color: #9CA3AF;
}

.btn-primary {
    width: 100%;
    height: 56px;
    background: #3B82F6;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 32px;
}

.btn-primary:hover {
    background: #2563EB;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary .material-icons {
    font-size: 20px;
}

.sms-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #E5E7EB;
    animation: slideUp 0.3s ease-out;
}

.sms-section.hidden {
    display: none;
}

.demo-info {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    text-align: center;
}

.demo-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #3B82F6;
    font-weight: 500;
    margin: 0;
}

.demo-text .material-icons {
    font-size: 16px;
}

/* Home Screen */
#home-screen {
    background: #F8FAFC;
}

.app-header {
    background: #1E3A8A;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.profile-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 18px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.home-content {
    padding: 24px;
    max-width: 600px;
    margin: 0 auto;
}

.welcome-card {
    background: linear-gradient(135deg, #3B82F6 0%, #1E3A8A 100%);
    padding: 24px;
    border-radius: 20px;
    margin-bottom: 32px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    animation: slideUp 0.6s ease-out 0.2s both;
}

.welcome-text .greeting {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-bottom: 4px;
}

.welcome-text h2 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.user-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: white;
    font-weight: 500;
}

.qr-card {
    background: white;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    animation: slideUp 0.6s ease-out 0.4s both;
}

.qr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.qr-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.countdown-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s ease;
}

.countdown-badge.warning {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.countdown-badge.normal {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.countdown-badge .material-icons {
    font-size: 14px;
}

.qr-subtitle {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 32px;
}

.qr-container {
    text-align: center;
}

.qr-loading {
    padding: 40px;
}

.qr-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border-width: 2px;
    border-color: #E5E7EB;
    border-top-color: #3B82F6;
    margin: 0 auto 16px;
}

.qr-loading p {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

.qr-content.hidden {
    display: none;
}

.qr-code {
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: 20px;
    border: 2px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.1);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.qr-code.updating {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.2);
}

.qr-payload {
    padding: 16px 20px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-bottom: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #3B82F6;
    letter-spacing: 2px;
}

.auto-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 12px;
    color: #6366F1;
    font-weight: 600;
}

.auto-refresh .material-icons {
    font-size: 16px;
}

/* Profile Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 28px 28px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: #E5E7EB;
    border-radius: 2px;
    margin: 12px auto 0;
}

.profile-content {
    padding: 24px;
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3B82F6 0%, #1E3A8A 100%);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.profile-avatar .material-icons {
    font-size: 40px;
    color: white;
}

.profile-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.profile-content > p {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
    margin-bottom: 32px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.info-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 16px;
    text-align: left;
}

.phone-card {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.region-card {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-card {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.store-card {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.phone-card .info-icon {
    background: rgba(16, 185, 129, 0.2);
}

.phone-card .material-icons {
    color: #10B981;
}

.region-card .info-icon {
    background: rgba(59, 130, 246, 0.2);
}

.region-card .material-icons {
    color: #3B82F6;
}

.badge-card .info-icon {
    background: rgba(139, 92, 246, 0.2);
}

.badge-card .material-icons {
    color: #8B5CF6;
}

.store-card .info-icon {
    background: rgba(239, 68, 68, 0.2);
}

.store-card .material-icons {
    color: #EF4444;
}

.info-icon .material-icons {
    font-size: 20px;
}

.info-text {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 2px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.btn-logout {
    width: 100%;
    height: 56px;
    background: #EF4444;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #DC2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-logout:active {
    transform: translateY(0);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    transform: translateY(-100px);
    opacity: 0;
    animation: toastSlideIn 0.3s ease-out forwards;
}

.toast.success {
    border-left: 4px solid #10B981;
}

.toast.error {
    border-left: 4px solid #EF4444;
}

.toast .material-icons {
    font-size: 20px;
}

.toast.success .material-icons {
    color: #10B981;
}

.toast.error .material-icons {
    color: #EF4444;
}

.toast-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes splashFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes logoScale {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes titleSlide {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtitleFade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding-top: 20px;
    }
    
    .login-form {
        padding: 24px;
        border-radius: 20px;
    }
    
    .home-content {
        padding: 16px;
    }
    
    .welcome-card {
        padding: 20px;
        margin-bottom: 24px;
    }
    
    .qr-card {
        padding: 24px;
    }
    
    .toast {
        min-width: 280px;
        margin: 0 16px;
    }
}

/* Loading States */
.btn-primary.loading {
    pointer-events: none;
}

.btn-primary.loading .material-icons {
    display: none;
}

.btn-primary.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: slideUp 0.3s ease-out;
}

.scale-in {
    animation: logoScale 0.3s ease-out;
}