/* web/DCLICK/public/assets/css/login.css - D-CLICK Orange & Green Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-orange: #FF8A00;
    --primary-orange-dark: #E67A00;
    --primary-orange-light: #FFA533;
    --secondary-orange: #FFAB66;
    --accent-orange: #FF6B00;
    
    --primary-green: #7BC142;
    --primary-green-dark: #6BA832;
    --primary-green-light: #90D155;
    --secondary-green: #A5D46A;
    --accent-green: #65B82E;
    
    --button-primary: #FF8A00;
    --button-primary-dark: #E67A00;
    --button-secondary: #7BC142;
    --button-accent: #FF6B00;
    
    --background-primary: #ffffff;
    --background-secondary: #FFF8F3;
    --background-tertiary: #F8FFF3;
    --background-glass: rgba(255, 138, 0, 0.1);
    
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-muted: #A0A6AA;
    --text-white: #ffffff;
    --text-orange: #FF8A00;
    --text-green: #7BC142;
    
    --error-color: #E74C3C;
    --error-bg: #FFF5F5;
    --success-color: #7BC142;
    --warning-color: #FF8A00;
    
    --shadow-orange-sm: 0 2px 4px rgba(255, 138, 0, 0.15);
    --shadow-orange-md: 0 4px 15px rgba(255, 138, 0, 0.25);
    --shadow-orange-lg: 0 8px 25px rgba(255, 138, 0, 0.3);
    --shadow-orange-xl: 0 15px 35px rgba(255, 138, 0, 0.2);
    --shadow-green-sm: 0 2px 4px rgba(123, 193, 66, 0.15);
    --shadow-green-md: 0 4px 15px rgba(123, 193, 66, 0.25);
    --shadow-green-lg: 0 8px 25px rgba(123, 193, 66, 0.3);
    --shadow-button: 0 4px 15px rgba(255, 138, 0, 0.4);
    --shadow-button-hover: 0 6px 20px rgba(230, 122, 0, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(255, 107, 0, 0.2);
}

input, textarea, button, select {
    -webkit-user-select: text !important;
    user-select: text !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, 
        var(--primary-orange) 0%, 
        var(--primary-orange-light) 20%, 
        var(--secondary-orange) 40%, 
        var(--primary-green-light) 60%, 
        var(--primary-green) 80%, 
        var(--primary-green-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 138, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(123, 193, 66, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 171, 102, 0.2) 0%, transparent 50%);
    animation: float 25s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-25px) rotate(2deg); }
    66% { transform: translateY(15px) rotate(-1deg); }
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-orange-xl);
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.login-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(255, 138, 0, 0.25), 0 10px 30px rgba(123, 193, 66, 0.15);
}

.brand-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-logo {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, 
        rgba(255, 138, 0, 0.1) 0%, 
        rgba(123, 193, 66, 0.1) 100%);
    backdrop-filter: blur(15px);
    box-shadow: 
        var(--shadow-orange-lg), 
        0 0 0 3px rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.brand-logo:hover {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 
        0 20px 40px rgba(255, 138, 0, 0.3), 
        0 10px 30px rgba(123, 193, 66, 0.2),
        0 0 0 3px rgba(255, 255, 255, 0.5);
}

.brand-logo img {
    width: 95px;
    height: 95px;
    object-fit: contain;
    border-radius: var(--radius-md);
    transition: transform 0.4s ease;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.brand-logo:hover img {
    transform: scale(1.1) rotate(2deg);
}

.brand-logo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 138, 0, 0.2) 50%, 
        rgba(123, 193, 66, 0.15) 70%, 
        transparent);
    animation: brandShine 5s infinite;
    pointer-events: none;
}

@keyframes brandShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(30deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(30deg); }
}

.brand-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, 
        var(--primary-orange) 0%, 
        var(--accent-orange) 30%, 
        var(--primary-green) 70%, 
        var(--primary-green-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.error-message {
    background: linear-gradient(135deg, var(--error-bg), #FFF0F0);
    border: 2px solid rgba(231, 76, 60, 0.3);
    border-left: 5px solid var(--error-color);
    color: var(--error-color);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-orange-sm);
    animation: shake 0.6s ease-in-out;
}

.error-message::before {
    content: '⚠️';
    font-size: 1.2em;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.form-section {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.75rem;
    position: relative;
    z-index: 1;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

.form-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 2px solid rgba(255, 138, 0, 0.2);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--background-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 10;
    cursor: text;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-user-select: text;
    user-select: text;
}

.form-input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.15);
    background: var(--background-primary);
    transform: translateY(-2px);
    z-index: 999;
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.login-button {
    width: 100%;
    padding: 1.3rem 1.5rem;
    background: linear-gradient(135deg, 
        var(--primary-orange) 0%, 
        var(--accent-orange) 50%, 
        var(--primary-orange-dark) 100%);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-button);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.7s ease;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-button-hover);
    background: linear-gradient(135deg, 
        var(--accent-orange) 0%, 
        var(--primary-orange) 50%, 
        var(--primary-orange-dark) 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

.login-button:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-orange-sm);
}

.signup-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, 
        var(--primary-green) 0%, 
        var(--accent-green) 50%, 
        var(--primary-green-dark) 100%);
    color: var(--text-white);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-green-md);
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.signup-button::before {
    content: '👤';
    font-size: 1.1em;
}

.signup-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-green-lg);
    background: linear-gradient(135deg, 
        var(--accent-green) 0%, 
        var(--primary-green) 50%, 
        var(--primary-green-dark) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    color: var(--text-white);
}

.signup-link {
    text-align: center;
    margin-top: 2rem;
    padding: 1.8rem;
    background: linear-gradient(135deg, 
        rgba(255, 138, 0, 0.05) 0%, 
        rgba(123, 193, 66, 0.05) 100%);
    border: 2px solid rgba(255, 138, 0, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(15px);
}

.signup-link p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.security-badge {
    margin-top: 2rem;
    padding: 1.8rem;
    background: linear-gradient(135deg, 
        rgba(123, 193, 66, 0.08) 0%, 
        rgba(255, 138, 0, 0.05) 100%);
    border: 2px solid rgba(123, 193, 66, 0.15);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(15px);
}

.security-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.security-title::before {
    content: '🛡️';
    font-size: 1.2em;
}

.security-features {
    list-style: none;
    padding: 0;
}

.security-features li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.7rem;
    padding-left: 1.8rem;
    position: relative;
    line-height: 1.6;
    font-weight: 500;
}

.security-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.1em;
}

.footer-info {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.8rem;
    border-top: 2px solid rgba(255, 138, 0, 0.1);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(40px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.success-message {
    background: linear-gradient(135deg, rgba(123, 193, 66, 0.1), rgba(165, 212, 106, 0.1));
    border: 2px solid rgba(123, 193, 66, 0.3);
    border-left: 5px solid var(--success-color);
    color: var(--success-color);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-green-sm);
    animation: slideIn 0.5s ease-out;
}

.success-message::before {
    content: '✅';
    font-size: 1.2em;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .login-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
        border-radius: var(--radius-lg);
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .brand-logo {
        width: 90px;
        height: 90px;
    }
    
    .brand-logo img {
        width: 75px;
        height: 75px;
    }
    
    .form-input,
    .login-button {
        padding: 1rem 1.2rem;
    }
    
    .security-badge,
    .signup-link {
        padding: 1.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.login-button:focus-visible,
.form-input:focus-visible,
.signup-button:focus-visible {
    outline: 3px solid var(--primary-orange);
    outline-offset: 2px;
}

.brand-logo.loading {
    animation: brandLogoSpin 2.5s linear infinite;
}

@keyframes brandLogoSpin {
    from { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.05); }
    to { transform: rotate(360deg) scale(1); }
}

@media (prefers-color-scheme: dark) {
    .brand-logo {
        background: linear-gradient(135deg, 
            rgba(255, 138, 0, 0.15) 0%, 
            rgba(123, 193, 66, 0.15) 100%);
    }
    
    .brand-logo img {
        filter: brightness(1.1) contrast(1.1) saturate(1.1);
    }
}

/* iOS PWA 전용 수정 (최종 버전) */
@supports (-webkit-touch-callout: none) {
    * {
        -webkit-tap-highlight-color: rgba(255, 138, 0, 0.3);
    }
    
    input, textarea {
        font-size: 16px !important;
        -webkit-user-select: text !important;
        user-select: text !important;
        -webkit-tap-highlight-color: rgba(255, 138, 0, 0.3);
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
    
    .form-input {
        -webkit-appearance: none !important;
        appearance: none !important;
        border-radius: 12px !important;
        padding: 1.2rem 1.5rem !important;
        font-size: 16px !important;
        background-color: #FFF8F3 !important;
        position: relative !important;
        z-index: 100 !important;
        cursor: text !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
    
    .form-input:focus {
        outline: 3px solid #FF6B00 !important;
        outline-offset: 2px !important;
        z-index: 9999 !important;
        background-color: #ffffff !important;
        border-color: #FF6B00 !important;
    }
    
    .form-input:active {
        background-color: #ffffff !important;
    }
    
    .login-container {
        position: relative !important;
        overflow: visible !important;
        min-height: auto !important;
        padding-bottom: 2rem !important;
    }
    
    body {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        min-height: 100vh !important;
        padding-bottom: 50vh !important;
    }
    
    .form-group {
        position: relative !important;
        z-index: 1 !important;
        margin-bottom: 2rem !important;
    }
    
    .form-label {
        pointer-events: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
}
