* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 24px 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #263238;
    letter-spacing: normal;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 720px;
}

.card {
    background-color: #e8f5e9;
    width: 100%;
    padding: 35px 30px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid #c8e6c9;
    transition: all 0.3s ease;
}

.title {
    color: #2e7d32;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: normal;
}

.subtitle {
    color: #66bb6a;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: normal;
    margin-bottom: 25px;
}

.input-group {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 auto 20px;
}

.input-code {
    width: 100%;
    padding: 14px 45px 14px 20px;
    border: 2px solid #a5d6a7;
    border-radius: 14px;
    font-size: 18px;
    text-align: center;
    outline: none;
    background: #ffffff;
    color: #2e7d32;
    font-weight: 600;
    letter-spacing: normal;
    transition: border-color 0.2s;
    -webkit-text-security: disc;
    text-security: disc;
}

.input-code:focus {
    border-color: #43a047;
}

.toggle-eye {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    background: none;
    border: none;
    color: #66bb6a;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-eye:hover {
    color: #2e7d32;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border: 0;
    border-radius: 12px;
    background: #43a047;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, filter 0.2s, transform 0.1s;
    margin: 4px;
    text-decoration: none;
    outline: none;
}

.btn:hover:not(:disabled) {
    filter: brightness(0.88);
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-green {
    background: #43a047;
    color: white;
}

.btn-light-green {
    background: #81c784;
    color: white;
}

.btn-yellow {
    background: #fff176;
    color: #212121;
}

.btn-blue {
    background: #0288d1;
    color: white;
}

.btn-danger {
    background: #e53935;
    color: white;
}

.btn-icon-ctrl {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 12px;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-icon {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 8px;
    margin: 2px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.drop-zone {
    border: 2px dashed #81c784;
    background: #f1f8e9;
    border-radius: 16px;
    padding: 25px 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: #2e7d32;
    background: #ded;
}

.select-custom {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #a5d6a7;
    background: #ffffff;
    color: #2e7d32;
    font-weight: 600;
    outline: none;
    margin: 4px 2px;
    font-size: 14px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.form-label {
    color: #2e7d32;
    font-weight: 600;
    font-size: 13px;
    display: block;
    margin-bottom: 4px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 15px;
    border-radius: 12px;
    border: 1px solid #c8e6c9;
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

th {
    background: #c8e6c9;
    color: #2e7d32;
    padding: 12px 10px;
    font-weight: 600;
}

td {
    padding: 10px;
    border-bottom: 1px solid #e8f5e9;
    color: #37474f;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

.code-badge {
    background: #e8f5e9;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: bold;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.badge-invite {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

.my-files-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #c8e6c9;
    padding: 20px;
    margin-top: 25px;
    text-align: left;
}

.my-files-header {
    color: #2e7d32;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-container {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

.noise-link {
    color: #66bb6a;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
    border-bottom: 1px dashed rgba(102, 187, 106, 0.5);
    padding-bottom: 2px;
    margin: 0 10px;
}

.noise-link:hover {
    color: #2e7d32;
    opacity: 1;
}

.status-msg {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
}

.status-error { color: #d32f2f; }
.status-success { color: #2e7d32; }

.hidden { display: none !important; }


/* Полноэкранный просмотр изображений */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.fullscreen-exit-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    transition: transform 0.2s;
    outline: none;
}

.fullscreen-exit-btn:hover {
    transform: scale(1.15);
}

#image-fullscreen-img {
    max-width: 95vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    user-select: none;
    -webkit-user-select: none;
}

@media (max-width: 600px) {
    .fullscreen-modal {
        padding: 10px;
    }
    .fullscreen-exit-btn {
        top: 12px;
        right: 12px;
        padding: 6px;
    }
    #image-fullscreen-img {
        max-width: 98vw;
        max-height: 95vh;
        border-radius: 8px;
    }
}
