:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --dark: #212529;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --danger: #f72585;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

header p {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.input-group {
    display: flex;
    margin-bottom: 20px;
}

.url-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.url-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    border-radius: var(--border-radius);
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #5e08a0;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option label {
    font-size: 0.9rem;
    color: var(--gray);
}

select {
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    background: white;
    font-size: 0.9rem;
}

.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--gray-light);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result {
    display: none;
    margin-top: 30px;
}

.screenshot-container {
    position: relative;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.screenshot {
    width: 100%;
    display: block;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gray-light);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.action-btn:hover {
    background: var(--gray);
    color: white;
}

.action-btn.download {
    background: var(--success);
    color: white;
}

.action-btn.download:hover {
    background: #3ab0d6;
}

.action-btn.share {
    background: var(--primary);
    color: white;
}

.action-btn.share:hover {
    background: var(--primary-dark);
}

.history {
    margin-top: 40px;
}

.history h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.history-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.history-item {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    cursor: pointer;
}

.history-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.history-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.history-url {
    padding: 15px;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.error {
    display: none;
    background: #ffe6e6;
    color: var(--danger);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    text-align: center;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }

    .url-input {
        border-radius: var(--border-radius);
        margin-bottom: 10px;
    }

    .btn {
        border-radius: var(--border-radius);
        width: 100%;
        margin-left: 0;
    }

    .btn-secondary {
        margin-top: 10px;
    }

    .options {
        flex-direction: column;
    }
}