/* =====================================================
   DECODER COMMON CSS
   Единый стиль для всех декодеров Detective Party
   Версия: 1.0
   ===================================================== */

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

/* BODY */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f2e9;
    color: #2b2a29;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* HEADER */
header {
    background: linear-gradient(135deg, #fab922, #665129);
    color: white;
    padding: 40px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header .subtitle {
    font-size: 1rem;
    opacity: 0.95;
}

/* CONTENT */
.content {
    background: #eee9dc;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

/* INFO BOX */
.info-box {
    background: rgba(88, 101, 242, 0.1);
    border-left: 4px solid #fab922;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 6px;
}

.info-box h3 {
    color: #fab922;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.info-box p {
    color: #55524a;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* FORMS */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2b2a29;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    background: #f5f2e9;
    border: 2px solid #d4cdbd;
    border-radius: 6px;
    color: #2b2a29;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #fab922;
    outline: none;
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #6c675d;
}

/* BUTTONS */
button,
.btn {
    padding: 12px 24px;
    background: #fab922;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

button:hover,
.btn:hover {
    background: #edaa13;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

button:active,
.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #eee9dc;
    border: 2px solid #d4cdbd;
}

.btn-secondary:hover {
    background: #e8e1cf;
    border-color: #fab922;
}

.btn-success {
    background: #23623c;
}

.btn-success:hover {
    background: #194b2d;
}

.btn-warning {
    background: #9a620d;
}

.btn-warning:hover {
    background: #7d4f08;
}

.btn-danger {
    background: #b3342a;
}

.btn-danger:hover {
    background: #8d251e;
}

/* RADIO/CHECKBOX GROUPS */
.radio-group,
.checkbox-group {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
}

input[type="radio"],
input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* RESULTS */
.results-container {
    margin-top: 30px;
}

.results-header {
    background: rgba(59, 165, 93, 0.1);
    border-left: 4px solid #23623c;
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 600;
    color: #23623c;
}

.result-box {
    background: #f5f2e9;
    border: 2px solid #d4cdbd;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.result-label {
    font-weight: 600;
    color: #fab922;
    margin-bottom: 8px;
    display: block;
}

.result-text {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.8;
    word-wrap: break-word;
    white-space: pre-wrap;
    color: #2b2a29;
}

/* TABLES */
table {
    width: 100%;
    border-collapse: collapse;
    background: #eee9dc;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

thead {
    background: #f5f2e9;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #fab922;
    border-bottom: 2px solid #d4cdbd;
}

td {
    padding: 12px;
    border-bottom: 1px solid #d4cdbd;
    color: #55524a;
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: #e8e1cf;
    cursor: pointer;
}

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

/* ALERTS */
.alert {
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(59, 165, 93, 0.1);
    border-color: #23623c;
    color: #23623c;
}

.alert-warning {
    background: rgba(250, 168, 26, 0.1);
    border-color: #9a620d;
    color: #9a620d;
}

.alert-danger {
    background: rgba(237, 66, 69, 0.1);
    border-color: #b3342a;
    color: #b3342a;
}

.alert-info {
    background: rgba(0, 180, 216, 0.1);
    border-color: #665129;
    color: #665129;
}

/* NAVIGATION */
.navigation {
    margin-top: 30px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-block;
    padding: 12px 24px;
    background: #eee9dc;
    color: #2b2a29;
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid #d4cdbd;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #e8e1cf;
    border-color: #fab922;
}

/* TIPS */
.tip {
    background: rgba(250, 168, 26, 0.1);
    border-left: 4px solid #9a620d;
    padding: 12px;
    margin: 16px 0;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #55524a;
}

.tip strong {
    color: #9a620d;
}

/* EXAMPLES */
.example {
    background: #f5f2e9;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-top: 10px;
    line-height: 1.8;
    color: #55524a;
}

/* BADGES */
.badge {
    display: inline-block;
    padding: 4px 10px;
    background: #fab922;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* COPY NOTIFICATION */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #23623c;
    color: white;
    padding: 16px 24px;
    border-radius: 6px;
    font-weight: 600;
    z-index: 1000;
    animation: fadeInOut 2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .content {
        padding: 20px;
    }
    
    .navigation {
        flex-direction: column;
    }
    
    .nav-link {
        text-align: center;
    }
}

/* UTILITIES */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.hidden {
    display: none !important;
}
