@import './reset.css';

* {
    box-sizing: border-box;
}

html {
    width: 100%;
}

body {
    background: #f6f6f6;
    color: #333;
    font-family: "Signika Negative", serif;
    font-size: calc(15px + 0.390625vw);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (min-width:768px) {
    body {
        font-size: 18px;
    }
}

a {
    text-decoration: none;
    color: #000;
}

a:hover {
    color: rgb(255, 174, 0);
}

h2 {
    font-size: 1.2em;
    font-weight: 700;
    text-transform: uppercase;
}

p {
    font-size: 0.9em;
    font-weight: 500;
}


/*
  HEADER
*/
header {
    position: fixed;
    display: flex;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 60;
    box-sizing: border-box;
    padding: 12px 20px;
    font-family: "Afacad", sans-serif;
    background: #fff;
    box-shadow: 0 1px 0px rgba(0, 0, 0, 0.15);
}

header .header_logo {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

header .header_link {
    margin-left: auto;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
}

header .header_link:hover {
    color: rgb(255, 174, 0);
}


/*
  ROOT
*/
#root {
    margin-top: 48px;
}


/*
  AUTH CONTAINER (centered card)
*/
.auth_container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.5;
}

@media (max-width:768px) {
    .auth_container {
        padding: 0 0 1vw 0;
    }
}

.block {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: none;
    border: solid 1px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 30px;
}

@media screen and (max-width: 768px) {
    .block {
        border-radius: 0px;
        border-left: 0;
        border-right: 0;
        padding: 30px 20px;
    }
}

.folder_title {
    font-size: 2.4rem;
    font-weight: 700;
    text-align: center;
    font-family: "Afacad", sans-serif;
    margin-bottom: 20px;
}

.folder_heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.row+.row {
    margin-top: 15px;
}

.row.spaced {
    margin-top: 25px;
}

label {
    width: 100%;
    position: relative;
    display: inline-block;
}

label span {
    padding: 10px;
    pointer-events: none;
    position: absolute;
    left: 10px;
    top: 4px;
    transition: 0.2s;
    opacity: 0.5;
    font-family: "Signika Negative", serif;
    font-size: 0.85rem;
    margin-top: 0px;
}

input {
    width: 100%;
    background: #f8f8f8;
    border-radius: 3px;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.35),
        inset 0 -1px 1px rgba(0, 0, 0, 0.05),
        0 1px 0px rgba(255, 255, 255, 1);
    border: none;
    font-weight: 500;
    padding: 14px 15px 12px 15px;
    font-family: "Signika Negative", serif;
    font-size: 0.9rem;
}

input:focus,
input:not(:placeholder-shown) {
    border-color: #000;
    background: linear-gradient(0deg, rgba(250, 250, 250, 1) 0%, rgba(255, 255, 255, 1) 100%);
}

input:focus+span,
input:not(:placeholder-shown)+span {
    opacity: 1;
    color: #444;
    background-color: #fff;
    transform: scale(0.85) translateY(-70%) translateX(-5px);
    padding: 5px;
}

input.alert {
    background-color: rgba(255, 0, 0, 0.18);
}

button {
    cursor: pointer;
    background: rgb(40, 40, 40);
    border-radius: 5px;
    font-family: "Signika Negative", serif;
    color: #eee;
    font-weight: 500;
    font-size: 1.1rem;
    width: 100%;
    padding: 12px;
    border: none;
}

button:hover {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
}

.button_secondary {
    background: #e0e0e0;
    color: #333;
}

.button_secondary:hover {
    background: linear-gradient(0deg, rgba(200, 200, 200, 1) 0%, rgba(220, 220, 220, 1) 100%);
}

.dual_buttons {
    display: flex;
    gap: 10px;
}

.dual_buttons button {
    flex: 1;
}

.text_alert {
    width: 100%;
    color: #ac2828;
    background-color: rgba(172, 40, 40, 0.08);
    border: 1px solid rgba(172, 40, 40, 0.2);
    border-radius: 4px;
    padding: 10px 14px;
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

#code_block_login_output {
    display: none;
}

.text_success {
    width: 100%;
    color: #2e7d32;
    background-color: rgba(46, 125, 50, 0.08);
    border: 1px solid rgba(46, 125, 50, 0.2);
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.auth_links {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
}

.auth_links a {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
}

.auth_links a:hover {
    color: rgb(255, 174, 0);
}

.auth_info {
    font-size: 0.8em;
    font-weight: 400;
    color: #444;
    margin-top: 12px;
}

.toggle_link {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
}

.toggle_link:hover {
    color: rgb(255, 174, 0);
}

.auth_back_link {
    margin-top: 28px;
    text-align: center;
}

.auth_back_link a {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1px;
}

.auth_back_link a:hover {
    color: rgb(255, 174, 0);
    border-bottom-color: rgb(255, 174, 0);
}


/*
  WORKSPACE (folder grid + image grid)
*/
.workspace {
    padding: 20px;
}

@media (max-width: 768px) {
    .workspace {
        padding: 10px;
    }
}

.blockList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}


/*
  FOLDER CARD (minimal)
*/
.folder_card {
    padding: 20px 22px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.folder_card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.folder_card_icon {
    color: #bbb;
    margin-bottom: 12px;
}

.folder_card_icon svg {
    width: 36px;
    height: 36px;
}

.folder_card_name {
    font-family: "Afacad", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
}

.folder_card_meta {
    font-size: 0.73rem;
    font-weight: 400;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 10px;
}

.folder_card_bottom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.folder_card_count {
    font-size: 0.72rem;
    font-weight: 500;
    color: #666;
    background: #f3f3f3;
    padding: 3px 10px;
    border-radius: 10px;
}

.folder_card_zip {
    font-size: 0.75rem;
    font-weight: 500;
    color: #888;
    text-decoration: none;
    margin-left: auto;
    cursor: pointer;
}

.folder_card_zip:hover {
    color: #333;
}

.folder_card_zip:hover {
    background: #eee;
    color: #000;
}


/*
  FOLDER EMPTY STATE
*/
.folder_empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.folder_empty p {
    margin-top: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
}

.folder_empty_sub {
    margin-top: 4px;
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    color: #999 !important;
}


/*
  IMAGE VIEW
*/
.image_header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ddd;
}

.image_header_info h3 {
    font-family: "Afacad", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
}

.image_header_info span {
    font-size: 0.8rem;
    font-weight: 400;
    color: #888;
}

.image_header_hint {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    color: #aaa;
    margin-top: 6px;
}

.image_header_close {
    margin-left: auto;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    padding: 6px 14px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.image_header_close:hover {
    background: #eee;
    color: #000;
}

.image_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

@media (max-width: 480px) {
    .image_grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }
}

.image_thumb {
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: border-color 0.15s;
}

.image_thumb:hover {
    border-color: rgba(0, 0, 0, 0.3);
}

.image_thumb img {
    width: 100%;
    object-fit: contain;
    display: block;
}

.image_empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 0.9rem;
}


/*
  MODAL
*/
.modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal_box {
    background: #fff;
    border-radius: 6px;
    padding: 30px;
    max-width: 400px;
    width: calc(100% - 40px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.modal_message {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal_close {
    width: auto;
    min-width: 100px;
    padding: 10px 24px;
    font-size: 0.9rem;
}
