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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

header h1 {
    color: #2c3e50;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-weight: bold;
    color: #3498db;
}

.user-info a {
    text-decoration: none;
    color: #3498db;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.user-info a:hover {
    background-color: #f0f8ff;
}

/* Login Form */
.login-form {
    background: #fff;
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #27ae60;
}

.btn-primary:hover {
    background-color: #219653;
}

.btn-edit {
    background-color: #f39c12;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

.btn-edit:hover {
    background-color: #e67e22;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.btn-add-alert {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-add-alert:hover {
    background-color: #2980b9;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
}

.message {
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard */
.coin-search-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.coin-search-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-container input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-container button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-container button:hover {
    background-color: #2980b9;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
}

.alerts-main-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.alerts-header h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin: 0;
}

.alerts-search-container {
    flex: 0 0 300px;
}

.alerts-search-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.alert-item, .coin-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    background-color: #fafafa;
}

.alert-item.triggered {
    border: 2px solid #27ae60;
    background-color: #f8fff8;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}

.alert-item.triggered .alert-info h3 {
    color: #27ae60;
}

.alert-info {
    flex: 1;
}

.alert-info h3, .coin-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.targets-display {
    margin: 10px 0;
}

.targets-display .target-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 5px 0;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.targets-display .target-row.triggered {
    border-left-color: #27ae60;
    background-color: #e8f5e8;
}

.target-info {
    font-size: 14px;
    color: #2c3e50;
}

.trigger-time {
    font-size: 12px;
    color: #7f8c8d;
}

.alert-status {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 10px;
}

.alert-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.coin-info {
    flex-grow: 1;
}

.no-alerts {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px 20px;
}

/* Target Management in Modal */
.targets-section {
    margin: 20px 0;
}

.targets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.targets-header label {
    font-weight: bold;
    color: #2c3e50;
}

.btn-add-target {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-add-target:hover {
    background-color: #219653;
}

.targets-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.target-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 100px 2fr 40px;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.target-inputs input,
.target-inputs select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn-remove-target {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-target:hover {
    background-color: #c0392b;
}

@media (max-width: 768px) {
    .alerts-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .alerts-search-container {
        flex: 1;
    }
    
    .target-inputs {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .alert-actions {
        flex-direction: row;
    }
}

/* Settings */
.settings-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.settings-form h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.settings-form small {
    color: #7f8c8d;
    font-size: 12px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}
