/* ===== Base Reset and Font ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    background: #0F0F0F;
    color: #FFFFFF;
    overflow: hidden; /* STOP ALL PAGE SCROLLING */
}

/* ===== Header ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: transparent;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 10;
}

header .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFFFFF;
}

nav a {
    margin-left: 25px;
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover, nav a.active {
    color: rgba(255, 255, 255, 0.623);
}

/* ===== Buttons ===== */
.btn-login,
.btn-primary,
.btn-secondary {
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn-login {
    padding: 8px 16px;
    border: 2px solid #FF7A1A;
    background: #FF7A1A;
    color: #fff;
}
.btn-login:hover { background: #fff; color: #FF7A1A; }

.btn-primary {
    padding: 10px 25px;
    background: #FF7A1A;
    color: #FFFFFF;
    border: 1px solid #FF7A1A;
}
.btn-primary:hover { background: #E56B17; }

.btn-secondary {
    padding: 10px 25px;
    background: #1F1F1F;
    color: #D0D0D0;
    border: 1px solid #333333;
}
.btn-secondary:hover { background: #2A2A2A; }

/* ===== Hero Section / Main Layout ===== */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 140px 8% 50px;
    background: #0F0F0F;
    position: relative;
    height: 100vh;
    overflow: hidden; /* Prevent page scroll */
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #FFFFFF;
}

.hero p {
    font-size: 1rem;
    color: #D0D0D0;
    margin-bottom: 20px;
}

.hero p.message {
    color: #FF7A1A;
    font-weight: 500;
    margin-bottom: 10px;
}

/* ===== Layout for Form + Pastes ===== */
.main-content {
    display: flex;
    gap: 40px;
    width: 100%;
    height: calc(100% - 80px); /* match hero padding and h1 */
    overflow: hidden; /* Prevent page scrolling */
}

/* Make left side wider */
.code-container {
    flex: 1.3; /* Increase width of create-paste box */
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 3;
}

/* Stretch the form properly horizontally + vertically */
.code-container form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #1F1F1F;
    padding: 30px 25px;
    border-radius: 12px;
    border: 1px solid #333333;
    width: 100%;
    height: 100%;
    overflow-y: auto; /* only form scrolls if needed */
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Right side pastes */
.paste-container {
    flex: 1;  /* Make widths closer to equal */
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    overflow-y: auto; /* Only the pastes scroll */
    z-index: 3;
}

.paste-frame-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.paste-list-wrapper {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

/* ===== Scrollbar Styling for Paste List ===== */
.paste-list-wrapper::-webkit-scrollbar {
    width: 10px;
}

.paste-list-wrapper::-webkit-scrollbar-track {
    background: #1F1F1F;
    border-radius: 10px;
}

.paste-list-wrapper::-webkit-scrollbar-thumb {
    background: #FF7A1A;
    border-radius: 10px;
}

.paste-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: #E56B17;
}

.paste-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0;
}

.paste-list li {
    background: #1F1F1F;
    border: 1px solid #333333;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.paste-list li a.title {
    font-weight: 600;
    font-size: 1rem;
    color: #FF7A1A;
    text-decoration: none;
}
.paste-list li a.title:hover { text-decoration: underline; }

.paste-list li .actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.paste-list li .actions a {
    font-size: 0.85rem;
    color: #D0D0D0;
    text-decoration: none;
}
.paste-list li .actions a:hover { color: #FF7A1A; }

/* ===== Form Inputs ===== */
.code-container form input,
.code-container form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #333333;
    background: #1F1F1F;
    color: #FFFFFF;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    z-index: 3;
}

.code-container form input:focus,
.code-container form textarea:focus {
    border-color: #FF7A1A;
    background: #2A2A2A;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    z-index: 3;
}

textarea {
    resize: none;
    min-height: 150px;
    z-index: 3;
}

/* ===== Decorative Circles ===== */
.circle {
    position: absolute;
    border-radius: 50%;
    background: #5e5e5e;
    mix-blend-mode: overlay;
    z-index: 0;
}
.circle.one { width: 200px; height: 200px; top: -50px; right: 50px; }
.circle.two { width: 300px; height: 300px; bottom: -100px; left: -100px; }
.circle.three { width: 150px; height: 150px; top: 200px; left: 60%; }


/* ===== Global Input Styling (Login / Register) ===== */
form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #333333;
    background: #1F1F1F;
    color: #FFFFFF;
    font-size: 14px;
    margin-bottom: 15px;
    outline: none;
    transition: all 0.2s;
}

form input:focus {
    border-color: #FF7A1A;
    background: #2A2A2A;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* ===== Readonly Paste Viewer Textarea ===== */
.hero textarea[readonly] {
    width: 100%;
    height: 350px;
    padding: 15px;
    background: #1F1F1F;
    border: 1px solid #333333;
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 14px;
    resize: none;
    outline: none;
    white-space: pre-wrap;
    overflow-y: auto;
    z-index: 3;
}

/* ===== Edit Page Wrapper ===== */
.edit-page-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ===== Editable Textarea (Edit Page) ===== */
.edit-page-container .code-container {
    width: 100%;
    margin: 0;
    padding: 0;
    z-index: 3;
}

.edit-page-container textarea.editable {
    width: 100%;
    max-width: 100%;
    height: 500px;
    padding: 15px;
    background: #1F1F1F;
    border: 1px solid #333333;
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: all 0.2s;
    z-index: 3;
}

.edit-page-container textarea.editable:focus {
    border-color: #FF7A1A;
    background: #2A2A2A;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    z-index: 3;
}

/* ===== Responsive / Adaptive ===== */

/* ===== Medium screens ===== */
@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
        gap: 20px;
        height: auto; /* allow content to grow naturally */
    }

    .paste-container {
        flex: 1;
        width: 100%;
        height: auto; /* stretch fully */
        margin-top: 20px;
    }

    .paste-list-wrapper {
        max-height: none; /* remove height restriction */
        overflow-y: auto; /* scroll if content too long */
    }

    .hero {
        padding: 120px 20px 40px;
        align-items: center;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        max-width: 100%;
        font-size: 0.95rem;
    }

    header {
        padding: 15px 20px;
    }
}

/* ===== Small screens ===== */
@media (max-width: 500px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero .hero-buttons a {
        display: inline-block;
        margin-bottom: 10px;
    }

    .paste-container {
        flex: 1;
        width: 100%;
        height: auto; /* allow it to stretch fully */
        margin-top: 15px;
    }

    .paste-list-wrapper {
        max-height: none;
        overflow-y: auto;
    }

    .circle {
        display: none; /* hide decorative circles */
    }
}

/* ===== Mobile Header / Hamburger ===== */
@media (max-width: 768px) {
    body, html {
        overflow: auto;
        height: auto;
    }

    /* Header / Hamburger */
    header {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        width: 100%;
        z-index: 50;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        z-index: 60;
        position: absolute;
        top: 15px;
        right: 20px;
    }

    .hamburger span {
        width: 30px;
        height: 3px;
        background: #fff;
        border-radius: 3px;
        transition: 0.4s ease;
    }

    .hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    /* Nav / Dropdown */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0F0F0F;
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transition: max-height 0.45s ease, opacity 0.35s ease;
        z-index: 55;
        padding: 0;
    }

    nav.open {
        max-height: 500px;
        opacity: 1;
        padding: 20px 0 30px 0;
    }

    nav a {
        display: block;
        width: 100%; /* full width */
        padding: 14px 20px;
        margin: 0;
        font-size: 1rem;
        text-align: center;
        color: #fff;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        box-sizing: border-box;
        text-decoration: none;
    }

    /* Hero Section Buttons */
    .hero {
        padding: 120px 20px 80px;
        text-align: center;
        height: auto;
    }

    .hero h1 { font-size: 2rem; }

    .hero .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        align-items: center;
    }

    .hero .hero-buttons a,
    .hero .hero-buttons .btn-login,
    .hero .hero-buttons .btn-primary,
    .hero .hero-buttons .btn-secondary {
        width: 100%;        /* stretch full width */
        max-width: 100%;    /* remove max-width to fully stretch */
        padding: 12px 20px;
        box-sizing: border-box;
        text-align: center;
        border-radius: 8px;
        display: block;
        text-decoration: none;
        color: #fff;
    }

    /* Buttons inside Hamburger Nav */
    .btn-login,
    .btn-primary,
    .btn-secondary {
        width: 100%;       /* stretch full width */
        padding: 12px 20px;
        margin: 0;
        box-sizing: border-box;
        text-align: center;
        border-radius: 8px;
        display: block;
    }

    /* Action buttons (Copy, Raw, Edit, Delete, Back) */
    div > .btn-secondary,
    div > .btn-primary {
        width: 100%;       /* stretch full width */
        padding: 12px 20px;
        margin-bottom: 12px;
        box-sizing: border-box;
        text-align: center;
        border-radius: 8px;
        display: block;
        text-decoration: none;
        color: #fff;
        background: #1F1F1F;      /* match Copy buttons */
        border: 1px solid #333;    /* match Copy buttons */
        transition: all 0.3s;
    }

    div > .btn-secondary:hover { background: #2A2A2A; }
    div > .btn-primary { background: #FF7A1A; border: 1px solid #FF7A1A; }
    div > .btn-primary:hover { background: #E56B17; }

    /* Remove extra margin on last button */
    div > .btn-secondary:last-child,
    div > .btn-primary:last-child { margin-bottom: 0; }
}

/* ===== Extra small screens ===== */
@media (max-width: 430px) {
    header .logo {
        font-size: 1.4rem;
    }

    nav a {
        font-size: 0.8rem; /* match style2 */
        padding: 12px 20px;
    }

    .hero h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .hero .hero-buttons a {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .paste-container {
        flex: 1;
        width: 100%;
        height: auto;
    }

    .paste-list-wrapper {
        max-height: none;
        overflow-y: auto;
    }

    .hero textarea[readonly],
    .edit-page-container textarea.editable {
        height: 300px;
    }

}

