/* DinastyCoin Club - Main Frontend Styles */

:root {
    --primary-dark: #1a5c6b;
    --primary-light: #2a8db0;
    --accent-gold: #d4af37;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-light: #dddddd;
    --success: #4caf50;
    --error: #d32f2f;
    --warning: #f57c00;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-light) 0%, #c3cfe2 100%);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-dark);
    margin-bottom: 0.5em;
    font-weight: 600;
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

/* Containers */
.dc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Buttons */
.dc-btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    user-select: none;
}

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

.dc-btn-primary {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(26, 92, 107, 0.2);
}

.dc-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 92, 107, 0.4);
}

.dc-btn-secondary {
    background: var(--bg-light);
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
}

.dc-btn-secondary:hover:not(:disabled) {
    background: var(--primary-dark);
    color: white;
}

.dc-btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* Cards */
.dc-card {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(26, 92, 107, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(26, 92, 107, 0.2);
}

/* Forms */
.dc-form {
    display: flex;
    flex-direction: column;
}

.dc-form-group {
    margin-bottom: 20px;
}

.dc-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-dark);
}

.dc-form input,
.dc-form select,
.dc-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.dc-form input:focus,
.dc-form select:focus,
.dc-form textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(42, 141, 176, 0.1);
}

.dc-form input:disabled,
.dc-form select:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
}

.dc-form small {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-size: 0.85em;
}

.dc-form-error {
    color: var(--error);
    font-size: 0.85em;
    margin-top: 5px;
    display: none;
}

.dc-form-error.active {
    display: block;
}

/* Checkboxes & Radio */
.dc-checkbox,
.dc-radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 15px 0;
}

.dc-checkbox input[type="checkbox"],
.dc-radio input[type="radio"] {
    width: auto;
    margin-top: 3px;
    cursor: pointer;
}

.dc-checkbox label,
.dc-radio label {
    margin: 0;
    cursor: pointer;
    font-size: 0.95em;
    color: var(--text-dark);
}

/* Alerts */
.dc-alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid;
    display: none;
    animation: slideDown 0.3s ease;
}

.dc-alert.active {
    display: block;
}

.dc-alert-success {
    background: #e8f5e9;
    border-color: var(--success);
    color: #2e7d32;
}

.dc-alert-error {
    background: #ffebee;
    border-color: var(--error);
    color: #b71c1c;
}

.dc-alert-warning {
    background: #fff3e0;
    border-color: var(--warning);
    color: #e65100;
}

.dc-alert-info {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading */
.dc-loading {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.dc-loading.active {
    display: block;
}

.dc-spinner {
    border: 3px solid rgba(26, 92, 107, 0.1);
    border-top: 3px solid var(--primary-light);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tables */
.dc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.dc-table thead {
    background: var(--primary-dark);
    color: white;
}

.dc-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.dc-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-light);
}

.dc-table tbody tr:hover {
    background: var(--bg-light);
}

/* Grid */
.dc-grid {
    display: grid;
    gap: 20px;
}

.dc-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.dc-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

@media (max-width: 768px) {
    .dc-grid-2,
    .dc-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dc-container {
        padding: 15px;
    }

    .dc-card {
        padding: 20px;
    }

    h1 { font-size: 1.5em; }
    h2 { font-size: 1.3em; }
    h3 { font-size: 1.1em; }

    .dc-btn {
        width: 100%;
    }
}

/* Utilities */
.dc-text-center {
    text-align: center;
}

.dc-text-right {
    text-align: right;
}

.dc-text-muted {
    color: var(--text-light);
}

.dc-mb-1 { margin-bottom: 0.5rem; }
.dc-mb-2 { margin-bottom: 1rem; }
.dc-mb-3 { margin-bottom: 1.5rem; }
.dc-mb-4 { margin-bottom: 2rem; }

.dc-mt-1 { margin-top: 0.5rem; }
.dc-mt-2 { margin-top: 1rem; }
.dc-mt-3 { margin-top: 1.5rem; }
.dc-mt-4 { margin-top: 2rem; }

.dc-p-1 { padding: 0.5rem; }
.dc-p-2 { padding: 1rem; }
.dc-p-3 { padding: 1.5rem; }
.dc-p-4 { padding: 2rem; }
