@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

html {
    height: 100%;
}

body {
    background: linear-gradient(135deg, #18181c 0%, #23232b 100%);
    color: #f5f5f5;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: clamp(1rem, 2vw, 2rem);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow-y: auto;
}

/* For dashboard, align to top but keep centered horizontally */
body.dashboard-view {
    align-items: flex-start;
    padding-top: clamp(1rem, 3vh, 2rem);
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200vw;
    height: 200vh;
    z-index: -1;
    background: radial-gradient(circle, rgba(68, 69, 74, 0.15) 0%, rgba(35, 35, 43, 0) 60%);
    animation: bgPulse 10s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes bgPulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }
    100% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

.container {
    position: relative;
    background: rgba(35, 35, 43, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: clamp(12px, 2vw, 16px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    padding: clamp(2rem, 5vw, 3rem);
    width: 100%;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease-out forwards;
    will-change: transform, opacity;
    transition: box-shadow 0.3s ease, border 0.3s ease;
}

.container:hover {
    box-shadow: 0 12px 48px 0 rgba(0,0,0,0.4);
    border-color: rgba(255, 255, 255, 0.18);
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

h1 {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #fff 60%, #bdbdbd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    filter: drop-shadow(0 2px 12px rgba(255,255,255,0.10));
    animation: fadeIn 1s ease 0.2s both;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.note {
    color: #f5f5f5;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.btn {
    display: inline-block;
    background: linear-gradient(95deg, #3a3a42 0%, #2a2a30 100%);
    color: #fff;
    font-family: inherit;
    font-size: clamp(1rem, 2.8vw, 1.2rem);
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: clamp(0.8em, 2.5vw, 1em) clamp(2em, 5vw, 2.5em);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    will-change: transform, box-shadow;
    outline: none;
    letter-spacing: 0.5px;
}
.btn:hover, .btn:focus {
    background: linear-gradient(95deg, #4a4a52 0%, #3a3a40 100%);
    box-shadow: 0 6px 24px rgba(0,0,0,0.3), 0 0 0 2px rgba(255,255,255,0.1);
    transform: translateY(-2px);
}
.btn:active {
    transform: translateY(0) scale(0.98);
    background: linear-gradient(95deg, #2a2a30 0%, #1a1a20 100%);
}

.input {
    width: 100%;
    margin-bottom: 1.2rem;
    padding: clamp(1em, 3vw, 1.2em) clamp(1.2em, 3vw, 1.5em);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #23232b;
    color: #fff;
    font-size: clamp(1rem, 2.8vw, 1.2rem);
    font-family: inherit;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.2);
    transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    outline: none;
    box-sizing: border-box;
}
.input:focus {
    background: #282830;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.2), 0 0 0 2px #5a5a6a;
    border-color: #5a5a6a;
}

form {
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.blurred {
    filter: blur(7px);
    transition: filter 0.3s ease;
    cursor: pointer;
    will-change: filter;
}
.blur-paste-id:hover .blurred,
.blur-paste-id:focus-within .blurred {
    filter: none;
}
.blur-paste-id {
    transition: background 0.2s ease;
    border-radius: 6px;
    padding: 0.1em 0.3em;
    display: inline-block;
}
.blur-paste-id:hover, .blur-paste-id:focus-within {
    background: rgba(255,255,255,0.06);
}

.tab-bar {
    display: flex;
    width: 100%;
    margin: 0 auto 1.5em auto;
    background: rgba(32,32,36,0.9);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    overflow: hidden;
}
.tab-btn {
    flex: 1 1 0;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 700;
    padding: clamp(1.2em, 3vw, 1.5em) 0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    border-radius: 0;
    outline: none;
    letter-spacing: 0.5px;
}
.tab-btn.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.1);
}
.tab-btn:not(.active):hover {
    background: rgba(255,255,255,0.04);
    color: #fff;
}

.main-title {
    background: linear-gradient(135deg, rgba(45,45,55,0.9), rgba(35,35,43,0.9));
    color: #fff;
    padding: clamp(1em, 3vw, 1.2em) clamp(2em, 5vw, 3em);
    border-radius: 12px;
    font-size: clamp(1.8rem, 6vw, 2.2rem);
    font-weight: 700;
    text-align: center;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: fit-content;
    max-width: clamp(800px, 98vw, 1800px);
}

.icon-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #bdbdbd;
    border-radius: 8px;
    padding: 0.5em;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(40px, 10vw, 48px);
    height: clamp(40px, 10vw, 48px);
}
.icon-btn:hover, .icon-btn:focus {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.paste-actions {
    display: flex;
    gap: clamp(0.8em, 2.5vw, 1.2em);
    align-items: center;
    margin-left: auto;
    padding-left: clamp(1em, 3vw, 1.5em);
}

.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(18,18,22,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    padding: clamp(1rem, 3vw, 2rem);
}
.modal-panel {
    background: #282830;
    border-radius: 16px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.3);
    padding: clamp(2rem, 5vw, 3rem) clamp(2.5rem, 5vw, 3.5rem);
    width: 100%;
    max-width: clamp(500px, 95vw, 800px);
    max-height: 90vh;
    overflow-y: auto;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    animation: fadeInUp 0.25s ease-out;
}

/* --- RESPONSIVE DESIGN --- */

/* Large screens */
@media (min-width: 1200px) {
    body {
        padding: clamp(2rem, 3vw, 3rem);
    }
    .container {
        max-width: 1600px;
    }
}

/* Medium screens */
@media (max-width: 1199px) and (min-width: 769px) {
    body {
        padding: clamp(1.5rem, 3vw, 2rem);
    }
    .container {
        max-width: 95vw;
    }
}

/* Tablet */
@media (max-width: 768px) {
    body {
        padding: clamp(1rem, 3vw, 1.5rem);
    }
    .main-title {
        display: none;
    }
    .tab-bar {
        display: none;
    }
    .container {
        max-width: 98vw;
    }
}

/* Mobile */
@media (max-width: 500px) {
    body {
        padding: clamp(0.5rem, 2vw, 1rem);
        height: 100vh;
        align-items: stretch;
    }
    .container {
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
        margin: 0;
        padding: clamp(1.5rem, 4vw, 2rem);
        box-shadow: none;
        display: flex;
        flex-direction: column;
        max-width: 100%;
    }
    body.login-view .container {
        justify-content: center;
    }
    body.dashboard-view .container {
        justify-content: flex-start;
    }
    h1 {
        font-size: clamp(2rem, 10vw, 2.5rem);
    }
    .input, .btn {
        font-size: clamp(1rem, 4vw, 1.1rem);
    }
    #dashboard-content img[alt="avatar"] {
        width: clamp(56px, 15vw, 64px) !important;
        height: clamp(56px, 15vw, 64px) !important;
    }
    .paste-actions {
        gap: clamp(0.5em, 3vw, 0.8em);
    }
    .icon-btn {
        width: clamp(36px, 10vw, 44px);
        height: clamp(36px, 10vw, 44px);
    }
    li[style*="padding:1em 1.2em"] {
        padding: clamp(1.2em, 4vw, 1.5em) clamp(1.5em, 4vw, 2em) !important;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    body {
        padding: 0.5rem;
    }
    .container {
        padding: 1.5rem;
    }
    h1 {
        font-size: 1.8rem;
    }
    .btn {
        padding: 0.8em 1.5em;
    }
    .icon-btn {
        width: 32px;
        height: 32px;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 0.5rem;
    }
    .container {
        max-height: 95vh;
        overflow-y: auto;
    }
    .main-title {
        margin-bottom: 0.5rem;
    }
}
