:root {
    --primary-color: #4a6bff;
    --primary-dark: #3a56d4;
    --secondary-color: #ff6b6b;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fd;
    --card-bg: #ffffff;
    --border-color: #e0e4f6;
    --success-color: #28a745;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --container-padding: clamp(15px, 3vw, 40px);
    --container-width: 1200px;
    --header-height: auto;
    --footer-height: auto;
    --font-size-base: clamp(0.875rem, 1vw, 1rem);
    --font-size-h1: clamp(1.5rem, 4vw, 2.5rem);
    --font-size-h2: clamp(1.2rem, 2vw, 1.5rem);
    --spacing-sm: clamp(8px, 1vw, 12px);
    --spacing-md: clamp(15px, 2vw, 25px);
    --spacing-lg: clamp(20px, 3vw, 40px);
}

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

*:before,
*:after {
    box-sizing: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

html {
    font-size: 100%;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* Main Layout */
.app-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
    position: relative;
}

main {
    flex: 1 0 auto;
    width: 100%;
    padding: var(--container-padding);
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    padding: 30px;
    width: 100%;
}

/* Header Styles */
header {
    width: 100%;
    text-align: center;
    padding: 15px var(--container-padding);
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo i {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-right: 8px;
}

h1 {
    font-size: var(--font-size-h1);
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 0 10px;
}

main.home-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    max-width: var(--container-width);
    padding: var(--container-padding);
    margin: 0 auto;
}

.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: var(--spacing-md);
    height: 100%;
    width: 100%;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: var(--font-size-h2);
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
    word-wrap: break-word;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    max-width: 100%;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}

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

button {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    width: 100%;
    margin-top: 10px;
    font-size: 0.95rem;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
}

.secondary-btn {
    background-color: #f0f2ff;
    color: var(--primary-color);
    padding: 8px 12px;
    font-size: 0.9rem;
}

.secondary-btn:hover {
    background-color: #e0e4ff;
}

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

.help-text {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-align: center;
}

.email-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
    width: 100%;
}

.email-item {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.email-header {
    background-color: #f5f7ff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 8px;
}

.email-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    word-break: break-word;
}

.email-controls {
    display: flex;
    gap: 8px;
}

.email-controls button {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.email-controls button:hover {
    color: var(--primary-color);
}

.email-content {
    padding: 12px;
}

.email-subject {
    margin-bottom: 8px;
    font-size: 0.9rem;
    word-wrap: break-word;
}

.email-body {
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px var(--container-padding);
    color: var(--text-light);
    font-size: 0.85rem;
    width: 100%;
    flex-shrink: 0;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

/* Watermark for copyright protection */
body::after {
    content: "© CirBack.com";
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 1000;
    transform: rotate(-45deg);
}

/* Responsive styles - Mobile First Approach */

/* Base mobile styles are already applied above - this section contains additional breakpoint-specific styles */

/* Tablet (600px and up) */
@media (min-width: 600px) {
    main.home-layout {
        padding: var(--container-padding);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .logo i {
        font-size: 2rem;
        margin-right: 10px;
    }
    
    header {
        padding: 20px var(--container-padding);
    }
    
    .card {
        padding: 20px;
        border-radius: 10px;
        margin-bottom: 20px;
    }
    
    h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    input, textarea, select {
        padding: 12px;
        font-size: 1rem;
    }
    
    textarea {
        min-height: 120px;
    }
    
    .primary-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .secondary-btn {
        padding: 10px 15px;
        font-size: 0.95rem;
    }
    
    .email-container {
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .email-item {
        border-radius: 8px;
    }
    
    .email-header {
        padding: 12px 15px;
    }
    
    .email-header h3 {
        font-size: 0.95rem;
    }
    
    .email-content {
        padding: 15px;
    }
    
    .email-subject {
        margin-bottom: 10px;
        font-size: 0.95rem;
    }
    
    .email-body {
        font-size: 0.95rem;
    }
    
    footer {
        margin-top: 30px;
        padding: 20px var(--container-padding);
        font-size: 0.9rem;
    }
    
    .footer-links {
        gap: 20px;
        margin-bottom: 15px;
    }
    
    .action-buttons {
        flex-direction: row;
    }
    
    .action-buttons button {
        width: auto;
    }
}

/* Small laptops (768px and up) */
@media (min-width: 768px) {
    main.home-layout {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
    
    .card {
        padding: 25px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .tagline {
        font-size: 1.05rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .email-header {
        flex-direction: row;
        align-items: center;
    }
    
    .email-controls {
        align-self: center;
        margin-top: 0;
    }
}

/* Desktops (992px and up) */
@media (min-width: 992px) {
    
    .app-container {
        max-width: 1100px;
    }
    
    h1 {
        font-size: 2.4rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .about-content, .policy-content, .terms-content {
        padding: 0 var(--spacing-lg);
        max-width: 800px;
        margin: 0 auto;
    }
}

/* Large desktops (1200px and up) */
@media (min-width: 1200px) {
    .app-container {
        max-width: var(--container-width);
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .about-content, .policy-content, .terms-content {
        padding: 0 calc(var(--spacing-lg) * 1.5);
        max-width: 900px;
    }
}

/* Extra large screens (1400px and up) */
@media (min-width: 1400px) {
    .app-container {
        max-width: 1300px;
    }
}
